<?php

/**
 * @author 
 * @copyright 2009
 */

$components = dirlist('../modules');
for($i = 0; !empty($components[$i]); $i++){
	if(is_file('..'.DIR_SEP.'components'.DIR_SEP.$components[$i].DIR_SEP.'info.xml')){

    $xml = simplexml_load_file('..'.DIR_SEP.'modules'.DIR_SEP.$components[$i].DIR_SEP.'info.xml');
    $name = (string)$xml->info[0]->name;
    $version = (string)$xml->info[0]->version;
    $description = 'title="'.(string)$xml->info[0]->description.'"';

	}else{
		$name = $components[$i];
		$version = 'unknown';
	}
	
	$component = explode('_', $components[$i]);
	
	echo '<li><a href="index.php?p=modules&amp;name='.$component[1].'" '.$description.' >'.$name.'</a></li>';
}

?>